<template>
    <common-container v-loading="loading" element-loading-spinner="el-icon-loading" element-loading-text="拼命加载中…">
        <div slot="common-search">
            <!-- <div class="common-btn">
                <el-button type="primary" size="mini" @click="exportExcelChild">导出excel</el-button>
            </div> -->

            <div class="search-common">
                <el-form :inline="true" :model="searchForm" ref="searchForm" size="mini">

                    <el-row :gutter="10">
                        <el-col :sm="8">
                            <el-form-item label="" prop="recode_name">
                                <el-form-item label="自然日">
                                    <el-date-picker v-model="searchForm.orderTime" :picker-options="pickerOptions" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
                                    </el-date-picker>
                                </el-form-item>
                            </el-form-item>
                        </el-col>
                        <el-col :sm="8">
                            <el-form-item label="日订单金">
                                <el-input v-model="searchForm.startpearl" placeholder="请输入数值" controls-position="right" style="width:150px"></el-input>
                                -
                                <el-input v-model="searchForm.endpearl" placeholder="请输入数值" controls-position="right" style="width:150px"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :sm="8">
                            <el-form-item label="平台应得佣金">
                                <el-input v-model="searchForm.startpearl" placeholder="请输入数值" controls-position="right" style="width:150px"></el-input>
                                -
                                <el-input v-model="searchForm.endpearl" placeholder="请输入数值" controls-position="right" style="width:150px"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>

                    <el-row :gutter="10">

                        <el-col :sm="8">
                            <el-form-item>
                                <el-button type="primary" @click="searchFromChild">查询</el-button>
                                <el-button type="info" @click="resetForm('searchForm')">重置</el-button>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </el-form>
            </div>

        </div>
        <div slot="common-body">
            <el-table :data="tableData" border style="width: 100%" size="mini">
                <el-table-column prop="date" label="自然日">
                </el-table-column>
                <el-table-column prop="name" label="代理总数">
                </el-table-column>
                <el-table-column prop="address" label="日订单金额">
                </el-table-column>
                <el-table-column prop="address" label="平台应得佣">
                </el-table-column>
            </el-table>
        </div>
        <div slot="common-page">
            <page-pagination v-on:pageFun="pageFunNumber" :page="page" :pageSize="pageSize" :total="total"></page-pagination>
        </div>
    </common-container>
</template>

<script>
import service from "@/service";
import pagePagination from "@/components/Common/pagePagination";
// import commonDialog from "@/components/Common/CommonDialog";
import commonContainer from "@/components/Common/CommonContainer";
import { computedDay184, dateFormat } from '@/assets/utils.js'
export default {
    props: ['breadcrumb'],
    data() {
        return {
            page: 1,
            pageSize: 10,
            total: 0,
            loading: false,
            tableData: [],
            searchForm: {
                type: "",
                refund_status: "",
                source: "",
                recode_select: "1",
                orderTime: [computedDay184(), dateFormat(new Date())],
                agent_num: "",
                recode_name: "",
                startpearl: "",
                endpearl: ""
            },
            pickerOptions: {
                disabledDate(time) {
                    return time.getTime() > Date.now();
                }
            }
        }
    },
    created() {
        this.$store.dispatch('setNavName', this.breadcrumb);
    },
    methods: {
        //查询列表
        queryTableList(page = 1) {

        },
        //分页
        pageFunNumber(page) {
            this.queryTableList(page);
        },
        //导出
        exportExcelChild() {

        },
        //查询
        searchFromChild() { },
        //重置
        resetForm(formName) {
            this.$refs[formName].resetFields();
        }
    },
    components: {
        pagePagination,
        commonContainer
    }
}
</script>

<style scoped>
</style>